<!--suppress ALL -->
<include file="./Template/header.html" />

<link rel="stylesheet" type="text/css" href="/Template/css/caseList.css">
<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">

    $(function() {

        //初始化页面配置
        document.title = "病例展示";

        var app = new Vue({
            el: '#container',
            data: {
                caseList: [],
            },
            methods: {
                case: function(id) {
                    window.location.href = "/wechat/case/list/id/"+id;
                },
                caseDetail: function(id) {
                    window.location.href = "/wechat/case/detail/id/"+id;
                },
                evaluate: function() {
                    window.location.href = "/wechat/evaluate";
                }
            }
        })

        function getCaseList(categoryId) {

            $.ajax({
                url:"/wechat/case/caseList",
                type:"post",
                data:{
                    categoryId: categoryId
                },
                dataType:"JSON",
                beforeSend:function(){
                    $("#loadingToast").show();
                },
                complete:function(){
                    $('#loadingToast').hide();
                },
                success:function(data){
                    app.caseList = data;
                },
            })
        }
        $(".search-box").change(function() {
            var value = $(this).find("option:selected").text();
            $(this).prev().attr('placeholder',value);
        });


        $("select[name=categoryId]").change(function() {

            var categoryId = $(this).val();

            getCaseList(categoryId);

        });

        getCaseList("{$categoryId}");

        var value = $("select[name=categoryId]").find("option:selected").text();
        $("select[name=categoryId]").prev().attr('placeholder',value);

    });


</script>
<style>
    body{
        background-color:#ffffff;
    }
</style>
<div class="container">
    <div class="content-all">
        <div class="bg-img">
            <img src="/Template/images/case_back_1.png" alt="">
        </div>
        <div class="activity-info"  v-on:click="case('5')">
            <div class="bg-img">
                <img src="https://xwk-file.oss-cn-qingdao.aliyuncs.com/Home/BraceFormer.png" alt="">
            </div>
        </div>
        <foreach name="caseIndex" item="vo">
            <div class="activity-info"  v-on:click="case('{$vo.belong}')">
                <div class="bg-img">
                    <img src="{$vo.link}" alt="">
                </div>
            </div>
        </foreach>
        <!--div class="bg-img">
            <img src="/Template/images/case_back_2.png" alt="">
        </div-->
    </div>
    <div class="content-all">
        <foreach name="caseList" item="vo">
            <div class="activity-info"  v-on:click="caseDetail('{$vo.case_id}')">
                <div class="bg-img">
                    <img src="{$vo.title_image}" alt="">
                </div>
            </div>
        </foreach>
        <!--div class="bg-img">
            <img src="/Template/images/case_back_2.png" alt="">
        </div-->
    </div>
    <!--div v-on:click="evaluate()">
        <div id="message" class="message">
            <img class="message-pic-back" src="/Template/images/icon-message-back.png" alt="">
        </div>
        <div id="message" class="message">
            <img class="message-pic" src="/Template/images/icon-evaluate.png" alt="">
        </div>
    </div-->
    <!--div class="content-left" v-for="desc in caseList">
            <div class="activity-info"  v-on:click="caseDetail(desc.case_id)">
                <div class="bg-img">
                    <img src="{{desc.title_image}}" alt="">
                </div>
            </div>

    </div-->

    <!--div class="product-content">
        <div class="product-classify" v-for="desc in caseList">

            <div class="line"></div>
            <div class="product-exihibate">
                <ul>
                    <li class="item" v-on:click="productDetail(desc.desc_id)" >
                        <img class="product-pic" src="{{desc.title_image}}" alt="">
                        <p class="product-name">{{desc.title}}</p>
                        <p class="product-aims">{{desc.second_title}}</p>
                    </li>
                </ul>
            </div>

        </div>
    </div-->
</div>
<include file="./Template/footer.html" />

